package com.magicsoft.weitown.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.boyuan.huijiaoyu.FindSearchActivity;
import com.boyuan.huijiaoyu.PeopleNearActivity;
import com.boyuan.huijiaoyu.R;
import com.boyuan.huijiaoyu.YaoyiyaoActivity;
import com.boyuan.huijiaoyu.YingyongActivity;
import com.example.nearby.NearCenterActivity;
import com.zxing.activity.CaptureActivity;

public class HomeFoundFragment extends BaseFragment implements OnClickListener {

	private final static String TAG = "HomeFoundFragment";

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view = inflater.inflate(R.layout.home_found_fragment, null);
		view.findViewById(R.id.nearCenter).setOnClickListener(this);
		view.findViewById(R.id.nearby).setOnClickListener(this);
		view.findViewById(R.id.shake).setOnClickListener(this);
		view.findViewById(R.id.saoyisao).setOnClickListener(this);
		view.findViewById(R.id.search).setOnClickListener(this);
		view.findViewById(R.id.yingyong).setOnClickListener(this);
		return view;
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.nearCenter:
			Intent intent=new Intent(getActivity(),NearCenterActivity.class);
			startActivityForResult(intent, 0);
			break;
		case R.id.nearby:
			Intent intent1=new Intent(getActivity(),PeopleNearActivity.class);
			startActivity(intent1);
			break;
		case R.id.shake:
			Intent intent2 = new Intent(getActivity(),YaoyiyaoActivity.class);
			startActivity(intent2);
			break;
		case R.id.saoyisao:
			Intent intent3 = new Intent(getActivity(),CaptureActivity.class);
			startActivity(intent3);
			break;
		case R.id.search:
			Intent intent4 = new Intent(getActivity(),FindSearchActivity.class);
			startActivity(intent4);
			break;
		case R.id.yingyong:
			Intent intent5 = new Intent(getActivity(), YingyongActivity.class);
			startActivity(intent5);
			break;
		default:
			break;
		}
	}

}
